﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Charts"
	xmlns:s="clr-namespace:System;assembly=mscorlib"
	xmlns:conv="clr-namespace:Charts.Converters"
>
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="CategoryAxis.xaml"/>
		<ResourceDictionary Source="Table.xaml"/>
		<ResourceDictionary Source="..\Theme.xaml"/>
	</ResourceDictionary.MergedDictionaries>
	
	<ControlTemplate x:Key="ChartTemplate" TargetType="Control">
		<Grid Margin="90,15,15,15" Effect="{StaticResource shadow}">
			
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="Auto"/>
			</Grid.ColumnDefinitions>
			
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="*"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>
			
			
			<TextBlock Grid.Column="1" TextAlignment="Center" VerticalAlignment="Center"
			           FontWeight="Black" FontSize="24" >Line chart</TextBlock>
			
			
			<!--Plot area border-->
			<Border Grid.Column="1" Grid.Row="1"
			        BorderBrush="{StaticResource foreground}"
			        Opacity="0.3"
			        SnapsToDevicePixels="True"
			        BorderThickness="1"/>
			
			<!--Value Y axis-->
			<local:ValueAxis Grid.Column="0" Grid.Row="1"
			                 Count="5"
			                 ItemStringFormat="{StaticResource stringFormat}"
			                 Maximum="100"/>
			
			<!--Category Y axis-->
			
			<StackPanel Grid.Column="1" Grid.Row="2">
				<ItemsControl Style="{StaticResource CategoryAxisStyle}"
				              DisplayMemberPath="{StaticResource categoryPath}"/>
				
				<!--Table-->
				<ItemsControl Style="{StaticResource CategoryAxisStyle}"
				              ItemStringFormat="{StaticResource stringFormat}"
				              DisplayMemberPath="Value"/>
			</StackPanel>
			
			<!--Table-->
			<!--<ItemsControl Grid.Column="1" Grid.Row="3"
			              
			              Style="{StaticResource TableStyle}"/>-->
			
			<!--Line graph-->
			<local:LineGraph Grid.Column="1" Grid.Row="1"
			                 ValuePath="{StaticResource valuePath}"
			                 ItemStringFormat="{StaticResource stringFormat}"
			                 Maximum="100"/>
		</Grid>
	</ControlTemplate>

</ResourceDictionary>